Skip to content

Conversation

@leeroybrun
Copy link
Contributor

@leeroybrun leeroybrun commented May 19, 2025

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests

Description

Clarity is trying to access document.adoptedStyleSheets in the worker, which returns an array of strings:
Screenshot 2025-05-19 at 13 29 08

#666

Use cases and why

    1. When accessing document.adoptedStyleSheets, should get the actual value

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

I have checked the http://localhost:4000/tests/integrations/clarity/ test before and after the fix.

I can confirm that before the fix, the error was present (after some time):
Screenshot 2025-05-19 at 13 47 58

And after the fix, Clarity seems to work and no error was present (even after some time spent on the page):
Screenshot 2025-05-19 at 13 53 59

@changeset-bot
Copy link

changeset-bot bot commented May 19, 2025

🦋 Changeset detected

Latest commit: d8a7096

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@qwik.dev/partytown Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@leeroybrun leeroybrun changed the title Add adoptedStyleSheets.get() to patched document in worker. Fixes #666 fix: Add adoptedStyleSheets.get() to patched document in worker. May 19, 2025
Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @leeroybrun it looks great to me 👏

@gioboa gioboa merged commit 59d5b66 into QwikDev:main May 20, 2025
9 of 10 checks passed
@github-actions github-actions bot mentioned this pull request May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants